package com.foxzzz.config;

import com.foxzzz.database.SqlExecutor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class Configration {
    public Map<String,Object> map=null;

    public final static String MaxCountShopForPlayer="MaxCountShopForPlayer";
    public final static String MaxCountStoreForPlayer="MaxCountStoreForPlayer";
    public Configration(){
        map=new ConcurrentHashMap<String,Object>();
        map.put("MaxCountShopForPlayer",100);
        map.put("MaxCountStoreForPlayer",100);
        List<Map<String,Object>> list= SqlExecutor.queryBySql("SELECT * FROM SYS_CONFIG");
        for (Map<String, Object> stringObjectMap : list) {
           String key=stringObjectMap.get("KEY").toString();
           Object val=stringObjectMap.get("VAL");
           map.put(key,val);
        }
    }


}
